package leetCode.firstWeek;

//两数之和
public class Code_1 {
    public int[] twoSum(int[] nums, int target) {
        int[] tmp = {0, 0};
        for(int i=0;i<nums.length;i++){
            for(int j=i+1;j<nums.length;j++){
                if(nums[i]+nums[j] == target){
                    tmp[0] = i;
                    tmp[1] = j;
                }
            }
        }
        return tmp;
    }
}
